IF OBJECT_ID('ssf.log_info') IS NOT NULL
	DROP TABLE ssf.log_info
GO

CREATE TABLE ssf.log_info (
	log_id BIGINT IDENTITY(1, 1) NOT NULL
	, begin_spid INT NOT NULL
	, begin_login NVARCHAR(128) NOT NULL
	, begin_log_time DATETIME2(7) NOT NULL
	, source_object NVARCHAR(512) NULL
	, task NVARCHAR(512) NULL
	, task_description NVARCHAR(2048) NULL
	, target_object NVARCHAR(512) NULL
	, log_sql NVARCHAR(MAX) NULL
	, end_spid INT NULL
	, end_login NVARCHAR(128) NULL
	, end_log_time DATETIME2(7) NULL
	, row_count BIGINT NULL
	, log_error_number INT NULL
	, log_error_line INT NULL
	, log_error_message NVARCHAR(2048) NULL
)
GO

ALTER TABLE ssf.log_info
ADD CONSTRAINT PK_log_info
PRIMARY KEY CLUSTERED (log_id)
GO
